import tushare as ts
from pymongo import MongoClient

client = MongoClient('mongodb://localhost:27017/')
db = client.lhtz


def get_all_stock_id():
    # stock_info = ts.get_stock_basics()
    stock_info = db.all_stock.find().limit(1)

    for i in stock_info:
        print(i)

    quit()

    print(stock_info)
    quit()
    # 获取所有股票代码
    for i in stock_info.index:
        print(i)


get_all_stock_id()
